package model

import (
	"time"
)

/*
DB Table Details
-------------------------------------


Table: profit_receiver
[ 0] id                                             INT8                 null: false  primary: true   isArray: false  auto: false  col: INT8            len: -1      default: []
[ 1] mch_id                                         VARCHAR(32)          null: false  primary: false  isArray: false  auto: false  col: VARCHAR         len: 32      default: []
[ 2] appid                                          VARCHAR(32)          null: false  primary: false  isArray: false  auto: false  col: VARCHAR         len: 32      default: []
[ 3] type                                           VARCHAR(32)          null: false  primary: false  isArray: false  auto: false  col: VARCHAR         len: 32      default: []
[ 4] account                                        VARCHAR(64)          null: false  primary: false  isArray: false  auto: false  col: VARCHAR         len: 64      default: []
[ 5] name                                           VARCHAR(256)         null: false  primary: false  isArray: false  auto: false  col: VARCHAR         len: 256     default: []
[ 6] relation_type                                  VARCHAR(32)          null: false  primary: false  isArray: false  auto: false  col: VARCHAR         len: 32      default: []
[ 7] create_time                                    TIMESTAMPTZ          null: false  primary: false  isArray: false  auto: false  col: TIMESTAMPTZ     len: -1      default: []
[ 8] update_time                                    TIMESTAMPTZ          null: false  primary: false  isArray: false  auto: false  col: TIMESTAMPTZ     len: -1      default: []


JSON Sample
-------------------------------------
{    "id": 86,    "mch_id": "NvdMWcNADyrWDdGdwwcilEFnA",    "appid": "adFwXXQZSORlHVyQhTPXwiXmG",    "type": "EetnKetuhFRFyHAOolxbrqZtC",    "account": "gBKYpIvFTJEWZYhZqPKfquxuj",    "name": "EpGqeuhsJOwmFMGAPKgUBxEpi",    "relation_type": "HLuSRXXqvFUsaOKsCfZxCDCAh",    "create_time": "2085-12-21T11:58:55.348570269+08:00",    "update_time": "2092-12-02T18:44:20.412041748+08:00"}



*/

// ProfitReceiver struct is a row record of the profit_receiver table in the wxpay database
type ProfitReceiver struct {
	//[ 0] id                                             INT8                 null: false  primary: true   isArray: false  auto: false  col: INT8            len: -1      default: []
	ID int64 `gorm:"primary_key;column:id;type:INT8;"`
	//[ 1] mch_id                                         VARCHAR(32)          null: false  primary: false  isArray: false  auto: false  col: VARCHAR         len: 32      default: []
	MchID string `gorm:"column:mch_id;type:VARCHAR;size:32;"`
	//[ 2] appid                                          VARCHAR(32)          null: false  primary: false  isArray: false  auto: false  col: VARCHAR         len: 32      default: []
	Appid string `gorm:"column:appid;type:VARCHAR;size:32;"`
	//[ 3] type                                           VARCHAR(32)          null: false  primary: false  isArray: false  auto: false  col: VARCHAR         len: 32      default: []
	Type string `gorm:"column:type;type:VARCHAR;size:32;"`
	//[ 4] account                                        VARCHAR(64)          null: false  primary: false  isArray: false  auto: false  col: VARCHAR         len: 64      default: []
	Account string `gorm:"column:account;type:VARCHAR;size:64;"`
	//[ 5] name                                           VARCHAR(256)         null: false  primary: false  isArray: false  auto: false  col: VARCHAR         len: 256     default: []
	Name string `gorm:"column:name;type:VARCHAR;size:256;"`
	//[ 6] relation_type                                  VARCHAR(32)          null: false  primary: false  isArray: false  auto: false  col: VARCHAR         len: 32      default: []
	RelationType string `gorm:"column:relation_type;type:VARCHAR;size:32;"`
	//[ 7] create_time                                    TIMESTAMPTZ          null: false  primary: false  isArray: false  auto: false  col: TIMESTAMPTZ     len: -1      default: []
	CreateTime time.Time `gorm:"column:create_time;type:TIMESTAMPTZ;"`
	//[ 8] update_time                                    TIMESTAMPTZ          null: false  primary: false  isArray: false  auto: false  col: TIMESTAMPTZ     len: -1      default: []
	UpdateTime time.Time `gorm:"column:update_time;type:TIMESTAMPTZ;"`
}

// TableName sets the insert table name for this struct type
func (p *ProfitReceiver) TableName() string {
	return "profit_receiver"
}
